package tech.aistar.service.demand.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Category;
import tech.aistar.mapper.deamnd.CategoryMapper;
import tech.aistar.service.demand.ICategoryService;

import java.util.List;

/**
 * Created by 豆梦寒 on 2019/9/27.
 */
@Service
public class CategoryServiceImpl implements ICategoryService {

    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> findAll() {
        List<Category> list = categoryMapper.findAll();
        return list;
    }

    @Override
    public Category findNameById(Integer id) {
        return categoryMapper.findNameById(id);
    }

    @Override
    public void delNameById(Integer id) {
        categoryMapper.delNameById(id);
    }

    @Override
    public void addCategory(Category category) {
        categoryMapper.addCategory(category);
    }

    @Override
    public void updateCategory(Category category) {
        categoryMapper.updateCategory(category);
    }
}
